package com.springboot.autoconfigure.oss.config;

import com.springboot.autoconfigure.oss.annontion.RequiredFiled;
import com.springboot.autoconfigure.oss.service.impl.AliyunOssApiServiceImpl;
import com.springboot.autoconfigure.oss.service.impl.WebDavApiServiceImpl;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Data
@Accessors(chain = true)
@Configuration
@ConfigurationProperties(prefix = "oss.webdav")
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class WebdavConfigPropertis extends AbstractOSSPropertis {
    @RequiredFiled
    private String baseUrl;
    @RequiredFiled
    private String userName;
    @RequiredFiled
    private String password;
    private String path;
    /**
     * 本地存储文件路径
     */
    private String storeLoaclPath;

    @Override
    public Class getImpl() {
        return WebDavApiServiceImpl.class;
    }
}
